package lab02.test35;

import java.util.Scanner;

public class JavaApplication {
    public static void main(String[] args) {
        Manager manager = new Manager();
        Salesman salesman = new Salesman();
        Worker worker = new Worker();

        System.out.println("输入经理的姓名和工资：");
        Scanner scanner = new Scanner(System.in);
        manager.setName(scanner.next());
        manager.manthSalary = scanner.nextDouble();

        System.out.println("请输入销售人员的姓名，底薪，销售数量以及单位数量的佣金：");
        salesman.setName(scanner.next());
        salesman.baseSalary = scanner.nextDouble();
        salesman.couter = scanner.nextInt();
        salesman.wages = scanner.nextDouble();

        System.out.println("请分别输入员工的姓名，工作的天数以及每天的佣金：");
        worker.setName(scanner.next());
        worker.day = scanner.nextInt();
        worker.daySalary = scanner.nextDouble();

        System.out.println("经理：" + manager.getName() + ":" + manager.computeSalary());
        System.out.println("销售员：" + salesman.getName() + ":" + salesman.computeSalary());
        System.out.println("工人：" + worker.getName() + ":" + worker.computeSalary());

    }
}
